home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D World 76
/
3DWI76.iso
/
pc
/
Shared.cst
/
00007_Script_field weblink
< prev
next >
Wrap
Text File
|
2006-02-08
|
3KB
|
121 lines
global currentmember,pointclicked,wordnum,wordtext2,wordtext
property scrollmode
property Sp
property cStart
on mouseDown me
scrollmode = "scroll"
cStart = sprite(me.spritenum).top + (sprite(me.spritenum).height / 2)
end
on mouseUpOutside me
scrollmode = "off"
end
on mouseup me
scrollmode = "off"
wordText = currentMember.word[wordNum]
-- put "Clicked word" && wordNum & ", the text" && wordText
if wordtext contains "@" then
-- alert "you clicked email address"&&wordtext
gotonetpage ("mailto:"&wordtext)
else
nothing
end if
if wordtext.char[1..7] = "http://" then
gotonetpage (wordtext)
else
nothing
end if
if wordtext.char[1..8] = "https://" then
gotonetpage (wordtext)
else
nothing
end if
if wordtext.char[1..4] = "www." then
gotonetpage ("http://"&wordtext)
else
nothing
end if
end
on linkUpdate me
-- repeat with i = 1 to sprite(me.spritenum).member.word.count
-- if sprite(me.spritenum).member.word[i].char[1..7] = "http://" or sprite(me.spritenum).member.word[i] contains "@" then
-- sprite(me.spritenum).member.word[i].fontstyle = [#bold]
-- sprite(me.spritenum).member.word[i].color = rgb(230,150,0)
--
--
-- else
-- sprite(me.spritenum).member.word[i].fontstyle = [#plain]
-- end if
--
-- end repeat
t = sprite(me.spritenum).member
repeat with i = 1 to t.word.count
if t.word[i].char[1..7] = "http://" or t.word[i] contains "@" or t.word[i].char[1..4] = "www." or t.word[i].char[1..8] = "https://" then
t.word[i].color = rgb(204,204,204)
-- t.word[i].font.underline = true
end if
end repeat
end
--on beginsprite me
-- t = sprite(me.spritenum).member
-- repeat with i = 1 to t.word.count
-- if t.word[i].char[1..7] = "http://" or wordtext2 contains "@" or wordtext2.char[1..4] = "www." or wordtext2.char[1..8] = "https://"then
-- t.word[i].color = rgb(255,255,255)
-- end if
--
-- end repeat
--
--end
on exitframe me
if scrollmode = "scroll" then
sprite(me.spritenum).member.scrolltop = sprite(me.spritenum).member.scrolltop + ((the mouseV - cStart) / 10)
end if
end
on mousewithin me
--cursor on
cursor 260
pointClicked = the mouseLoc
currentMember = sprite(me.spriteNum).member
wordNum = sprite(me.spriteNum).pointToWord(pointClicked)
if wordnum <> -1 then
wordText2 = currentMember.word[wordNum]
if wordtext2.char[1..7] = "http://" or wordtext2 contains "@" or wordtext2.char[1..4] = "www." or wordtext2.char[1..8] = "https://"then
cursor 280
else
cursor 260
end if
end if
end
on mouseleave
cursor -1
end